import request from '@/utils/request'

// 专利导出接口
export function getMyPaperList(data) {
  return request({
    url: '/patent/export',
    method: 'post',
    data
  })
}

// 专利分页查询接口
export function getUserPatents(data) {
  return request({
    url: '/patent/UserGetRelatePatent',
    method: 'post',
    data
  })
}

export function thesis_add(data) {
  return request({
    url: '/patent/addPatent',
    method: 'post',
    data
  })
}

export function thesis_add2(data) {
  return request({
    url: '/patent/UpdatePatent',
    method: 'post',
    data
  })
}

export function thesis_delete(patentID) {
  return request({
    url: '/patent/deletePatent',
    method: 'get',
    params: { patentID }
  })
}

export function thesis_commit(patentID) {
  return request({
    url: '/patent/ReCommitPatent',
    method: 'post',
    params: { patentID }
  })
}

export function get_thesis_author(id) {
  return request({
    url: '/patentauthor/selectAllAuthor',
    method: 'get',
    params: { id }
  })
}

export function thesis_author_add(data) {
  return request({
    url: '/patentauthor/addPatentAuthor',
    method: 'post',
    data
  })
}

export function thesis_author_edit(data) {
  return request({
    url: '/patentauthor/updatePatentAuthor',
    method: 'post',
    data
  })
}

export function thesis_author_delete(id) {
  return request({
    url: '/patentauthor/deletePatentAuthor',
    method: 'get',
    params: { id }
  })
}

export function get_thesis_project(patentID) {
  return request({
    url: '/patentproject/GetPatentProjectByPatentID',
    method: 'get',
    params: { patentID }
  })
}

export function thesis_project_add(data) {
  return request({
    url: '/patentproject/AddPatentProject',
    method: 'post',
    data
  })
}

export function thesis_project_edit(data) {
  return request({
    url: '/patentproject/UpdatePatentProject',
    method: 'post',
    data
  })
}

export function thesis_project_delete(patentProjectID) {
  return request({
    url: '/patentproject/RemovePatentProject',
    method: 'get',
    params: { patentProjectID }
  })
}

// 院级审核
export function get_thesis_yuanji(data) {
  return request({
    url: '/patent/CollegeUserGetPatent',
    method: 'post',
    data
  })
}

export function thesis_pass_yuanji(PaID) {
  return request({
    url: '/patent/CollegeCheckPass',
    method: 'get',
    params: { PaID }
  })
}

export function thesis_back_yuanji(data) {
  return request({
    url: '/patent/CollegeCheckBack',
    method: 'post',
    data
  })
}

// 校级审核
export function get_thesis_xiaoji(data) {
  return request({
    url: '/patent/SchoolUserGetPatent',
    method: 'post',
    data
  })
}

export function thesis_pass_xiaoji(PaID) {
  return request({
    url: '/patent/SchoolCheckPass',
    method: 'get',
    params: { PaID }
  })
}

export function thesis_back_xiaoji(data) {
  return request({
    url: '/patent/SchoolCheckBack',
    method: 'post',
    data
  })
}

export function thesis_author_edit_xiaoji(data) {
  return request({
    url: '/patentauthor/upPatentAuthor',
    method: 'post',
    data
  })
}

export function update_thesis_source(data) {
  return request({
    url: '/patentqulification/upPatentScore',
    method: 'post',
    data
  })
}

// 附件
export function file_add(data) {
  return request({
    url: '/patent/addpatentfile',
    method: 'post',
    data
  })
}

export function get_file(id) {
  return request({
    url: '/patent/pagepatentfileCondition',
    method: 'get',
    params: { id }
  })
}

export function file_delete(id) {
  return request({
    url: '/patent/Deletepatentfile',
    method: 'get',
    params: { id }
  })
}

// 量化
export function getCascadingData(params) {
  return request({
    url: '/patenttype/getCascadingData',
    method: 'get',
    params
  })
}

export function getQulification(PatentID) {
  return request({
    url: '/patentqulification/getPatentQulification',
    method: 'get',
    params: { PatentID }
  })
}

export function deleteQulification(PatentQualificationID) {
  return request({
    url: '/patentqulification/deletePatentQulification',
    method: 'get',
    params: { PatentQualificationID }
  })
}

export function addQulification(data) {
  return request({
    url: '/patentqulification/addPatentQualification',
    method: 'post',
    data
  })
}

export function GetById(patentID) {
  return request({
    url: '/patent/GetPatentById',
    method: 'get',
    params: { patentID }
  })
}

export function GetPatentDTOById(patentID) {
  return request({
    url: '/patent/GetPatentDTOById',
    method: 'get',
    params: { patentID }
  })
}

// 撤回专利
export function thesis_withdraw(patentID) {
  return request({
    url: '/patent/WithdrawPatent',
    method: 'get',
    params: { patentID }
  })
}
